package com.byxy.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.byxy.dao.TabDao;
import com.byxy.entity.Tab;
import com.byxy.service.TabService;

@Transactional
@Service
public class TabServiceImpl implements TabService {
	@Autowired
	private TabDao tabDao;

	public List<Tab> findAll() {
		return tabDao.findAll();
	}

	public Tab get(Integer tabId) {
		return tabDao.get(tabId);
	}

	public void delete(Integer tabId) {
		tabDao.delete(tabId);
	}

	public void update(String tabName, Integer selectedForumId, Integer tabId) {
		tabDao.update(tabName, selectedForumId, tabId);
	}

	public void add(String tabName, Integer forumId) {
		tabDao.add(tabName, forumId);
	}

	public void updateForumId(Integer forumId, Integer tabId) {
		tabDao.updateForumId(forumId, tabId);
	}

}
